package com.example.aigc_education.enums;

import lombok.Getter;

@Getter
public enum UserAnswerStatus {

    FLASHCARD_STATUS("抽认卡状态", "0,0,0"),
    QUIZZES_STATUS("测验状态", "0,0");

    private final String title;
    private final String status;

    UserAnswerStatus(String title, String status) {
        this.title = title;
        this.status = status;
    }

    public static UserAnswerStatus fromStatus(String status) {
        for (UserAnswerStatus userAnswerStatus : UserAnswerStatus.values()) {
            if (userAnswerStatus.getStatus().equals(status)) {
                return userAnswerStatus;
            }
        }
        throw new IllegalArgumentException("No enum constant with status " + status);
    }
}
